package com.alliance.shuwei.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import com.alliance.shuwei.service.UserService;

@Controller
public class AdminController {
	@Autowired
	private UserService userService;
	@RequestMapping("/admin")
	public ModelAndView admin() {
		ModelAndView mv = new ModelAndView("admin");
		mv.addObject("users", userService.getAllUsers());
		return mv;
	}
}
